<html>
<head>
<title></title>
<!-- You must included the test case object -->
<script type="text/javascript" src="/shared/scripts/testcase.js"></script>
<script type="text/javascript">
if (window.addEventListener) {
	window.addEventListener('load', f, false);
} else if (window.attachEvent) {
	window.attachEvent('onload', f);
} else {
	window.onload = f;
}

function f() {
	var tc = new TestCase();
	tc.input = 'Your Input';
	tc.description = 'A description of the testcase';
	tc.expected_result = "A possible result like: 'undefined'";
	// run a test that will probably fail, we just pass in the function that will run the "dangerous" test.
	tc.savePreTest(run_fail_test);
	
}

function run_fail_test(xhr, tc) {
	// you probably do not need to use the xhr object, unless you want the results of the savePreTest
	// tc is our testcase object which you can continue to fill out/use
	do_something_stupid();
	tc.result = 'ok';
	tc.test_passed = 'true'; // Did the test pass? true or false
	tc.saveTest(); // save the test results.
}
</script>
</head>
<body></body>
</html>